import webview
from Api import Api 
import random
import json
from pathlib import Path
import re
import tkinter as tk
from tkinter import filedialog
import importlib

from typing import  TypeVar,Union,Dict




OPTION_FILE_PATH = "./option.json"



def expose(window):
    pass

if __name__ == '__main__':
    config = {
        'debug': True,  # 开启调试模式
    }
    api = Api()
    win = webview.create_window(title= '批量文件重命名', 
                                url = 'http://localhost:8080/',
                                 text_select=False,
                                 width=1600,
                                 height=900,
                                 resizable=False,
                                 on_top=False,
                                 js_api=api
                                 )
    
    webview.start(expose, win)  # 启动webview时调用expose
